package com.zygh.policeasset.service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.zygh.policeasset.mapper.SoftwitMapper;
import com.zygh.policeasset.pojo.Company;
import com.zygh.policeasset.pojo.Softwit;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
/* loaded from: police-asset-2.0-0.0.1-SNAPSHOT.jar:BOOT-INF/classes/com/zygh/policeasset/service/SoftwitService.class */
public class SoftwitService {
    @Autowired
    SoftwitMapper softwitMapper;

    public int deleteById(int id) {
        return this.softwitMapper.deleteById(Integer.valueOf(id));
    }

    public int insert(Softwit softwit) {
        return this.softwitMapper.add(softwit);
    }

    public Softwit findById(Integer id) {
        return this.softwitMapper.findById(id);
    }

    public List<Softwit> findAll() {
        return this.softwitMapper.findAll();
    }

    public int updateById(Softwit softwit) {
        return this.softwitMapper.updateById(softwit);
    }

    public PageInfo findByCondition(String buildNum, int pageNum, int pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        return new PageInfo<>(this.softwitMapper.findByCondition(buildNum));
    }

    public Integer findCount(Integer roleId, String status) {
        return this.softwitMapper.findCount(roleId, status);
    }

    public int updateStatus(String assetsStatus, Integer id) {
        return this.softwitMapper.updatestatus(assetsStatus, id);
    }

    public PageInfo findByRoleId(Softwit softwit, int pageNum, int pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        return new PageInfo<>(this.softwitMapper.findByRoleId(softwit));
    }

    public int updatestatusByBuildNum(String assetsStatus, String buildNum) {
        return this.softwitMapper.updatestatusByBuildNum(assetsStatus, buildNum);
    }

    public List<String> discountChart(String type) {
        return this.softwitMapper.discountChart(type);
    }

    public List<Company> columnar() {
        return this.softwitMapper.columnar();
    }

    public Integer updateStartProvisionDate(String startProvisionDate, String buildNum, Integer sectionId) {
        return this.softwitMapper.updateStartProvisionDate(startProvisionDate, buildNum, sectionId);
    }

    public Integer updassetsClassificationId(String ids, Integer assetsClassificationId, Integer assetsClassificationPid) {
        Integer count = 0;
        for (String str : ids.split(",")) {
            this.softwitMapper.updateassetsClassification(Integer.valueOf(Integer.parseInt(str)), assetsClassificationId, assetsClassificationPid);
            count = Integer.valueOf(count.intValue() + 1);
        }
        return count;
    }

    public Integer findCountByNumAndId(String buildNum, Integer sectionId) {
        return this.softwitMapper.findCountByNumAndId(buildNum, sectionId);
    }
}